import request from '@/utils/request'
import downFileRequest from "@/utils/downFileRequest";

export function getShoppingInvitation(data){
    return request({
        url: "/invitation",
        method: "post",
        data: data
    })
}
// 生成采购邀请函
export function addInvitation(data){
    return request({
        url:"/invitation/add",
        method: "post",
        data:data
    })
}

// 获得采购邀请函
export function showInvitation(data){
    return request({
        url: "/invitation/show/invitation/" + data,
        method: "get"
    })
}

// 获得盖章的采购邀请函
export function getInvitationTag(data){
    return request({
        url:"/invitation/show/invitationStamped/" + data,
        method: "get"
    })
}

// 下载采购邀请函
export function downloadInvitationFile(data){
    return downFileRequest({
        url: "/invitation/downloadFile/" + data,
        method: "get",
    })
}
// 下载盖章的邀请函
export function downloadStamped(data){
    return downFileRequest({
        url: "/invitation/downlaodFile/Stamped/" + data,
        method: "get",
    })
}

// 查询全部供应商
export function getAllSuppliers(data){
    return request({
        url: "/purchase/get/allSuppliers/" + data,
        method: "get"
    })
}

// 删除盖章的零散通知函
export function deleteInvitationStamped(data){
    return request({
        url: "/invitation/delete/stamped/" + data,
        method: "post"
    })
}
